﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.ServiceProcess;
using System.Text;

namespace Wicresoft.Generic.Service
{
    [RunInstaller(true)]
    public class TInstaller : System.Configuration.Install.Installer
    {
         /// <summary>
        /// Public Constructor for WindowsServiceInstaller.
        /// - Put all of your Initialization code here.
        /// </summary>
        public TInstaller()
        {
            ServiceProcessInstaller p = new ServiceProcessInstaller();
            ServiceInstaller s = new ServiceInstaller();

            //# Service Account Information
            p.Account = ServiceAccount.LocalSystem;
            p.Username = null;
            p.Password = null;

            //# Service Information
            s.DisplayName = "Wicresoft Generic Service";
            s.Description = "Provide utility methods for Wicresoft Fundamental System.";
            s.StartType = ServiceStartMode.Automatic;

            //# This must be identical to the WindowsService.ServiceBase name
            //# set in the constructor of WindowsService.cs
            s.ServiceName = "wshost";

            this.Installers.Add(p);
            this.Installers.Add(s);
        }
    }
}
